package com.metrics.graphics;

import java.io.*;
import java.util.List;

import org.jfree.data.general.AbstractDataset;

import com.database.objects.*;
import com.metrics.extractors.MetricExtractor;
import com.metrics.formatters.TimeFormatter;

public abstract class GraphicGenerator {

	public void generate(OutputStream out, List<Developer> developers, MetricExtractor extractor, Type type, Status status, String start, String finish, TimeFormatter formatter) throws IOException {
		AbstractDataset data = getData(developers, extractor, type, status, start, finish, formatter);
		graphic(out, data);
	}

	public abstract AbstractDataset getData(List<Developer> developers, MetricExtractor extractor, Type type, Status status, String start, String finish, TimeFormatter formatter);

	public abstract void graphic(OutputStream out, AbstractDataset data) throws IOException;

}